<template>
  <div class="echarts" id="echarts">

  </div>
</template>

<script>
  import echarts from 'echarts'
  export default {
    name: "echarts",
    data() {
      return {
        option: {
          xAxis: {
            type: 'category',
            boundaryGap: false,
            data: ['Mon', 'Tue', 'Wed', 'Thu'],
            show:false
          },
          yAxis: {
            type: 'value',
            show:false
          },
          label:{
            show:true,
            formatter(params){
              console.log(params)
              //params.marker.innerHTML = '1.19元/㎡'
              return '1.19元/㎡'
            }
          },
          series: [{
            data: [100, 120, 90, 130],
            type: 'line',
            areaStyle: {}
          }]
        }
      }
    },
    mounted() {
     const echart = echarts.init(document.getElementById('echarts'))
      echart.setOption(this.option)
    }
  }
</script>

<style scoped lang="less">
  .echarts {
    width: 450px;
    height: 345px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(238, 238, 238, 1);
  }
</style>
